#include <stdio.h>
#include <stdlib.h>

int main( int argc, char *argv[] ){

	if( argc != 2 ){
		printf("usage: %s data.ini\n", argv[0]);
		return 0;
	}

	char fname[128];
    sprintf(fname, "%s", argv[1]);
    
    FILE *fp = fopen(fname,"r");

	if( fp == NULL ) {
		printf("failed to open: %s\n", fname);
		exit(0);
	}

	uint addr, data;
    
    while( fscanf(fp, "%X %x", &addr, &data ) == 2 ){
        printf("addr = %u 0x%X, data = %u 0X%X\n", addr, addr, data, data);
    }
    
    fclose(fp);
}
